﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AJWPFAdmin.Services.Migrations
{
    /// <inheritdoc />
    public partial class addcolumnforwatchhouse : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<decimal>(
                name: "Latitude",
                table: "Watchhouses",
                type: "decimal(10,6)",
                precision: 10,
                scale: 6,
                nullable: false,
                defaultValue: 0m,
                comment: "纬度");

            migrationBuilder.AddColumn<decimal>(
                name: "Longitude",
                table: "Watchhouses",
                type: "decimal(10,6)",
                precision: 10,
                scale: 6,
                nullable: false,
                defaultValue: 0m,
                comment: "经度");

            migrationBuilder.AddColumn<int>(
                name: "PassagewaySum",
                table: "Watchhouses",
                type: "int",
                nullable: false,
                defaultValue: 0,
                comment: "道闸数量");

            migrationBuilder.AddColumn<string>(
                name: "DevNo",
                table: "Devices",
                type: "varchar(100)",
                maxLength: 100,
                nullable: true,
                comment: "设备SN号")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480306L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480307L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480308L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480309L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480310L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480311L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "PlatformCustomers",
                keyColumn: "Id",
                keyValue: 480306,
                columns: new[] { "CreateDate", "ExpireDate" },
                values: new object[] { new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714), new DateTime(2025, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714) });

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)6,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1000,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1001,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1002,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1003,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1004,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1005,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 1L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(6261));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 2L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(6281));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 3L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(6290));

            migrationBuilder.UpdateData(
                table: "SystemRoles",
                keyColumn: "Id",
                keyValue: 480306L,
                columns: new[] { "CreateDate", "UpdateDate" },
                values: new object[] { new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714), new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714) });

            migrationBuilder.UpdateData(
                table: "SystemUsers",
                keyColumn: "Id",
                keyValue: 480306L,
                columns: new[] { "CreateDate", "UpdateDate" },
                values: new object[] { new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714), new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714) });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Latitude",
                table: "Watchhouses");

            migrationBuilder.DropColumn(
                name: "Longitude",
                table: "Watchhouses");

            migrationBuilder.DropColumn(
                name: "PassagewaySum",
                table: "Watchhouses");

            migrationBuilder.DropColumn(
                name: "DevNo",
                table: "Devices");

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480306L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480307L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480308L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480309L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480310L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480311L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "PlatformCustomers",
                keyColumn: "Id",
                keyValue: 480306,
                columns: new[] { "CreateDate", "ExpireDate" },
                values: new object[] { new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302), new DateTime(2025, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302) });

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)6,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1000,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1001,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1002,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1003,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1004,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1005,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 1L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(8566));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 2L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(8583));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 3L,
                column: "CreateDate",
                value: new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(8593));

            migrationBuilder.UpdateData(
                table: "SystemRoles",
                keyColumn: "Id",
                keyValue: 480306L,
                columns: new[] { "CreateDate", "UpdateDate" },
                values: new object[] { new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302), new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302) });

            migrationBuilder.UpdateData(
                table: "SystemUsers",
                keyColumn: "Id",
                keyValue: 480306L,
                columns: new[] { "CreateDate", "UpdateDate" },
                values: new object[] { new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302), new DateTime(2024, 10, 30, 14, 9, 0, 527, DateTimeKind.Local).AddTicks(6302) });
        }
    }
}
